/**
 * 
 */
package uk.co.cocking.getinline2.testhelpers;

import uk.co.cocking.getinline2.io.helpers.RssRecordBuilder;
import uk.co.cocking.getinline2.record.Record;

public class RssTestDataGenerator {
   
   public static final String RECORD_1_TITLE = "Star City";
   public static final String RECORD_1_LINK = "http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp";
   public static final String RECORD_1_DESCRIPTION = "How do Americans get ready to work with Russians?";
   public static final String RECORD_1_GUID = "http://liftoff.msfc.nasa.gov/2003/06/03.html#item573";
   
   public static final String RECORD_2_TITLE = "Space Exploration";
   public static final String RECORD_2_LINK = "http://liftoff.msfc.nasa.gov/";
   public static final String RECORD_2_DESCRIPTION = "Sky watchers in Europe will experience a partial eclipse of the Sun.";
   public static final String RECORD_2_GUID = "http://liftoff.msfc.nasa.gov/2003/05/30.html#item572";

   public static final String RECORD_3_TITLE = "The Engine That Does More";
   public static final String RECORD_3_LINK = "http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp";
   public static final String RECORD_3_DESCRIPTION = "Before man travels to Mars, NASA hopes to design new engines.";
   public static final String RECORD_3_GUID = "http://liftoff.msfc.nasa.gov/2003/05/27.html#item571";

   public Record record1() {
      return new RssRecordBuilder().
         withTitle(RECORD_1_TITLE).
         withLink(RECORD_1_LINK).
         withDescription(RECORD_1_DESCRIPTION).
         withGuid(RECORD_1_GUID).
         build();
   }
   
   public Record record2() {
      return new RssRecordBuilder().
         withTitle(RECORD_2_TITLE).
         withLink(RECORD_2_LINK).
         withDescription(RECORD_2_DESCRIPTION).
         withGuid(RECORD_2_GUID).
         build();
   }
   
   public Record record3() {
      return new RssRecordBuilder().
      withTitle(RECORD_3_TITLE).
      withLink(RECORD_3_LINK).
      withDescription(RECORD_3_DESCRIPTION).
      withGuid(RECORD_3_GUID).
      build();
   }
   
   public String rssFeedString() {
      String result = 
               "<?xml version=\"1.0\"?>" +
               "<rss version=\"2.0\">" +
               "<channel>" +
               "<title>Lift Off News</title>" +
               "<link>http://liftoff.msfc.nasa.gov/</link>" +
               "<description>Liftoff to Space Exploration.</description>" +
               "<language>en-us</language>" +
               "<pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>" +
               "<lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>" +
               "<docs>http://blogs.law.harvard.edu/tech/rss</docs>" +
               "<generator>Weblog Editor 2.0</generator>" +
               "<managingEditor>editor@example.com</managingEditor>" +
               "<webMaster>webmaster@example.com</webMaster>" +
               "<ttl>5</ttl>" +
               
               "<item>" +
                  "<title>"+RECORD_1_TITLE+"</title>" +
                  "<link>"+RECORD_1_LINK+"</link>" +
                  "<description>"+RECORD_1_DESCRIPTION+"</description>" +
                  "<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>" +
                  "<guid>"+RECORD_1_GUID+"</guid>" +
               "</item>" +
               
               "<item>" +
               "<title>"+RECORD_2_TITLE+"</title>" +
               "<link>"+RECORD_2_LINK+"</link>" +
               "<description>"+RECORD_2_DESCRIPTION+"</description>" +
               "<pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>" +
               "<guid>"+RECORD_2_GUID+"</guid>" +
               "</item>" +
               
               "<item>" +
               "<title>"+RECORD_3_TITLE+"</title>" +
               "<link>"+RECORD_3_LINK+"</link>" +
               "<description>"+RECORD_3_DESCRIPTION+"</description>" +
               "<pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>" +
               "<guid>"+RECORD_3_GUID+"</guid>" +
               "</item>" +
               
               "</channel>" +
         "</rss>";
      return result;
   }
}